﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace AnthStat.Infrastructure
{
    public interface IRepository<T>
    {
        IEnumerable<T> GetAll();
        IEnumerable<T> GetAll(object parentId);
        T GetByKey(object keyValue);

        void Insert(T entity, bool autoPersist = true);
        void Update(T entity, bool autoPersist = true);
        void Delete(T entity, bool autoPersist = true);

        string Save();

        //event EventHandler<Progress ProgressChanged;
    }
}
